home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
f90
/
compl.z
/
compl
Wrap
Text File
|
1998-10-30
|
4KB
|
102 lines
COMPL(3I) Last changed: 1-6-98
NNAAMMEE
CCOOMMPPLL - Computes complement
SSYYNNOOPPSSIISS
CCOOMMPPLL (([II==]_i))
IIMMPPLLEEMMEENNTTAATTIIOONN
UNICOS, UNICOS/mk, and IRIX systems
SSTTAANNDDAARRDDSS
CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
DDEESSCCRRIIPPTTIIOONN
The CCOOMMPPLL intrinsic function computes the complement of _i. It accepts
the following argument:
_i A Boolean, integer, real, logical, or Cray pointer value.
CCOOMMPPLL is an elemental function. The name of this intrinsic cannot be
passed as an argument.
The following tables show both the logical complement and the bit-wise
logical complement:
------------------------------------
Logical CCOOMMPPLL
Variable (Logical Variable)
------------------------------------
T F
F T
------------------------------------
-----------------------------------
Bit of CCOOMMPPLL
Variable (Bit of Variable)
-----------------------------------
1 0
0 1
-----------------------------------
NNOOTTEESS
CCOOMMPPLL is outmoded. Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l,
_V_o_l_u_m_e _2, publication SR-3903, for information about outmoded features
and their preferred standard alternatives.
CCAAUUTTIIOONNSS
Unexpected results can occur when Boolean functions are declared
external and then used with logical arguments. On UNICOS and
UNICOS/mk systems, the external Boolean functions always treat their
arguments as type Boolean and return a Boolean result. On IRIX
systems, the result is an integer.
RREETTUURRNN VVAALLUUEESS
When given an argument of type logical, CCOOMMPPLL computes a logical
complement and returns a logical result.
On UNICOS and UNICOS/mk systems, with an argument of type integer,
real, Boolean, or Cray pointer, CCOOMMPPLL computes a bit-wise logical
complement and returns a Boolean result. No type conversion occurs.
On IRIX systems, with an argument of type integer, real, Boolean, or
Cray Pointer, CCOOMMPPLL computes a bit-wise logical complement and returns
an integer result.
EEXXAAMMPPLLEESS
The following section of Fortran code shows the CCOOMMPPLL function used
with an argument of type logical:
LOGICAL L1, L2
...
L2 = COMPL(L1)
The following section of Fortran code shows the CCOOMMPPLL function used
with an argument of type integer. The bit patterns of the argument
and result are also given. For clarity, only the rightmost 8 bits are
shown.
INTEGER I1, I2
I1 = 240
...
I2 = COMPL(I1)
-------------------------------
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
-------------------------------
I1
-------------------------------
| 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
-------------------------------
I2
SSEEEE AALLSSOO
_I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
printed version of this man page.